package org.cms.feature.user.service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.cms.feature.user.entity.SysUser;
import org.cms.feature.user.mapper.UserMapper;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserService {

    private final UserMapper userMapper;

    public UserService(UserMapper userMapper) {
        this.userMapper = userMapper;
    }

    /*
    * 查询用户列表
    * */
    public PageInfo<SysUser> findUserList(int no, int size) {
        PageHelper.startPage(no, size);
        List<SysUser> userList = userMapper.findUserList();
        return new PageInfo<>(userList);
    }


}
